package com.itheima.tanhua.domain;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * @author Lff
 * @date 2022/4/8
 * 答案表
 * tb_answer
 * <p>
 * drop TABLE if EXISTS  tb_answer;
 * CREATE TABLE `tb_answer`(
 * id BIGINT COMMENT '答案id' PRIMARY KEY,
 * answer_txt VARCHAR(255) COMMENT '答案内容' NOT NULL,
 * score INT COMMENT '答案分值' NOT NULL,
 * problem_id BIGINT COMMENT '答案所属题目id' NOT NULL,
 * created datetime COMMENT '创建时间',
 * 	updated datetime COMMENT '修改时间'
 * );
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Answer implements Serializable {
    private Long id; //答案id
    private Long problemId;//答案所属题目id
    private Integer score;//答案分值 1 2 3 4 5 五个等级
    private String answerTxt; //答案内容

    @TableField(fill = FieldFill.INSERT)
    private Date created;//创建时间
    @TableField(fill=FieldFill.INSERT_UPDATE)
    private Date updated;//修改时间
}
